package router

import (
	"fiber-demo/internal/controller"
	"fiber-demo/internal/middleware"
	"github.com/gofiber/fiber/v3"
)

func BindUserRoute(a *fiber.App) {
	userGroup := a.Group("/user")
	userGroup.Get("/", middleware.Protected(), controller.UserControllerInstance.List)
	userGroup.Get("/:id", middleware.Protected(), controller.UserControllerInstance.One)
	userGroup.Put("/", middleware.Protected(), controller.UserControllerInstance.Modify)
	userGroup.Post("/", middleware.Protected(), controller.UserControllerInstance.Add)
	userGroup.Delete("/:id", middleware.Protected(), controller.UserControllerInstance.Delete)
}
